using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SmartLauncher
{
    public partial class SplashDialog : Form
    {
        public SplashDialog()
        {
            InitializeComponent();

						logoPictureBox.Image = IconEngine.GetApplicationIcon().ToBitmap();
        }

        #region "SynchronizeEngine Event Handlers"
        void ProcessStop(object sender, ProcessEventArgs e)
        {
            myProgress.Value = 0;
            Refresh();
        }

        void ProcessStart(object sender, ProcessEventArgs e)
        {
            myProgress.Value = 0;
            myProgress.Maximum = e.Counter;
            Refresh();
        }

        void ProcessRun(object sender, ProcessEventArgs e)
        {
            myProgress.Value = e.Counter;
            Refresh();
        }
        #endregion

        private void SplashDialog_Load(object sender, EventArgs e)
        {
            Text = Properties.Settings.Default.ShellHome;
            SyncEngine.ProcessRun += new OnProcessRunDelegate(ProcessRun);
            SyncEngine.ProcessStart += new OnProcessStartDelegate(ProcessStart);
            SyncEngine.ProcessStop += new OnProcessStopDelegate(ProcessStop);
        }

    }
}